package com.zhx.threadcoreknowledge.starttheard;

/**
 * @author ：zhanghaixuan
 * @date ：Created in 2019-09-18 08:28
 * 用途         ： 对比start 和run两种启动线程的方式
 */
public class StartAndRunMethod {

    public static void main(String[] args) {
        Runnable runnable = new Runnable() {
            @Override
            public void run() {
                System.out.println(Thread.currentThread().getName());
            }
        };

        runnable.run();

        new Thread(runnable).start();
    }
}
